package com.autumn.workflow.command.task;

import java.util.List;

import org.activiti.engine.impl.interceptor.CommandContext;
import org.springframework.beans.factory.annotation.Autowired;

import com.autumn.workflow.command.ParamCommand;
import com.autumn.workflow.model.UserTaskFlow;
import com.autumn.workflow.model.UserTaskNode;

public class QueryNextPossibleUserTaskNodesCommand implements ParamCommand<UserTaskFlow, List<UserTaskNode>> {

    @Autowired
    private UserTaskRepository repository;

    @Override
    public List<UserTaskNode> execute(CommandContext commandContext, UserTaskFlow param) {
        return this.repository.queryNextPossibleUserTaskNodes(param);
    }
}
